<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商品添加</title>
</head>
<body>
<form action="/insert" method="post" enctype="multipart/form-data" style="margin: 100px auto;">
    <table style="margin: 100px auto">
        <tr>
            <td>商品名称</td>
            <td>
                <input type="text" name="name" placeholder="请输入商品名称">
            </td>
        </tr>
        <tr>
            <td>商品单价</td>
            <td>
                <input type="text" name="price" placeholder="请输入商品单价">
            </td>
        </tr>
        <tr>
            <td>商品类型</td>
            <td>
                <select name="type" id="">
                    {{range .Data}}
                    <option value="{{.TypeId}}">{{.TypeName}}</option>
                    {{end}}
                </select>
            </td>
        </tr>
        <tr>
            <td>商品状态</td>
            <td>
                <input type="radio" name="status" value="上架">上架
                <input type="radio" name="status" value="下架">下架
            </td>
        </tr>
        <tr>
            <td>商品图片</td>
            <td>
                <input type="file" name="images">
            </td>
        </tr>
        <tr>
            <td>商品描述</td>
            <td>
                <input type="text" name="desc">
            </td>
        </tr>
        <tr>
            <td style="text-align: center" colspan="2">
                <input type="submit" value="添加">
            </td>
<!--        <td></td>-->
        <tr>
    </table>
</form>
</body>
</html>